<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta name="format-detection" content="telephone=no">
    <title>阿福易购-店铺</title>
    <link rel="stylesheet" href="/css/app.css">
</head>
<body ontouchstart="">
<header class="ui-header ui-header-stable af-header">
    <ul class="ui-row-flex">
        <li class="ui-col ui-flex ui-flex-pack-start">
            <a ontouchstart="window.history.back();"><i class="ui-icon-return"></i></a>
        </li>
        <li class="ui-col ui-flex ui-flex-pack-center">
            <h1>店铺</h1>
        </li>
        <li class="ui-col ui-flex ui-flex-pack-end">
            <a href="search-form.html"><i class="ui-icon-search"></i></a>
        </li>
    </ul>
</header>


<div class="ui-container shop-page">
    <section class="ui-slider">
        <ul class="ui-slider-content">
            <li data-href="./activity.html"><span style="background-image:url(http://placeholder.qiniudn.com/640x200)"></span></li>
        </ul>
    </section>
    <ul class="ui-list ui-list-one ui-goods-shop">
        <li>
            <div class="ui-list-thumb">
                <span style="background-image:url(http://afyg.img-cn-qingdao.aliyuncs.com/cae871cec556d714de993401961d9619.png@!180-72)"></span>
            </div>
            <div class="ui-list-info">
                <h4 class="ui-nowrap">阿福易购 <br><span>在售商品 <em>1234</em> 件</span></h4>
                <div class="ui-txt-info J-fav" data-id="123">
                    <i class="ui-icon-trend af-txt-highlight"></i>
                    <p>收藏</p>
                </div>
            </div>
        </li>
    </ul>

    <section class="ui-rec-goods">
        <h2>全部商品</h2>
        <ul id="scrollLoadGoods" data-url="./ajax_goods.json" class="ui-rec-goods-item">
            <li class="l">
                <div class="ui-goods-card">
                    <div data-href="./goods-info.html" class="ui-grid-halve-img af-border-b">
                        <span style="background-image:url(http://afyg.img-cn-qingdao.aliyuncs.com/5d48e7d1008139953992cd20290bd8b3.jpg@!254-254)"></span>
                    </div>
                    <div class="ui-goods-info">
                        <h3 data-href="./goods-info.html" class="ui-nowrap-multi">玛歌鹰贵 窖藏干红葡萄酒</h3>
                        <p><span class="shop-price">¥680.00</span><del class="market-price">¥37.00</del></p>
                    </div>
                </div>
            </li>
            <li class="r">
                <div class="ui-goods-card">
                    <div data-href="./goods-info.html" class="ui-grid-halve-img af-border-b">
                        <span style="background-image:url(http://afyg.img-cn-qingdao.aliyuncs.com/185ba482837f78627138d96b8a1f3085.jpg@!254-254)"></span>
                    </div>
                    <div class="ui-goods-info">
                        <h3 data-href="./goods-info.html" class="ui-nowrap-multi">玛歌鹰贵 窖藏干红葡萄酒</h3>
                        <p><span class="shop-price">¥680.00</span><del class="market-price">¥37.00</del></p>
                    </div>
                </div>
            </li>
            <li class="l">
                <div class="ui-goods-card">
                    <div data-href="./goods-info.html" class="ui-grid-halve-img af-border-b">
                        <span style="background-image:url(http://afyg.img-cn-qingdao.aliyuncs.com/185ba482837f78627138d96b8a1f3085.jpg@!254-254)"></span>
                    </div>
                    <div class="ui-goods-info">
                        <h3 data-href="./goods-info.html" class="ui-nowrap-multi">玛歌鹰贵 窖藏干红葡萄酒</h3>
                        <p><span class="shop-price">¥680.00</span><del class="market-price">¥37.00</del></p>
                    </div>
                </div>
            </li>

            <li class="r">
                <div class="ui-goods-card">
                    <div data-href="./goods-info.html" class="ui-grid-halve-img af-border-b">
                        <span style="background-image:url(http://afyg.img-cn-qingdao.aliyuncs.com/185ba482837f78627138d96b8a1f3085.jpg@!254-254)"></span>
                    </div>
                    <div class="ui-goods-info">
                        <h3 data-href="./goods-info.html" class="ui-nowrap-multi">玛歌鹰贵 窖藏干红葡萄酒</h3>
                        <p><span class="shop-price">¥680.00</span><del class="market-price">¥37.00</del></p>
                    </div>
                </div>
            </li>
        </ul>
        <div class="ui-loading-wrap">
            <p>正在加载中...</p>
            <i class="ui-loading"></i>
        </div>
    </section>

</div>

<script src="/lib/zepto.min.js"></script>
<script src="/js/frozen.js"></script>
<script src="/js/app.min.js"></script>
<script>
    $(function () {
        $('.J-fav').on('click',function () {
            var that=$(this),id=that.attr('data-id'),txtItem=that.find('p');
            var data={
                type:'SHOP',
                reference_id:id,
                _token:_token
            };
            $.ajax({
                url:'/ajax_success.json',type:'get',dataType:'json',data:data,
                success:function (res) {
                    if(res.status){
                        txtItem.text('已收藏');
                        that.off('click');
                    }
                },
                error:function (error) {
                    topTip(error.message||'服务器忙，请刷新重试');
                }
            })
        });
    })
</script>
</body>
</html>